/**
 * Copyright (c) 2009  Collaborative Development Group, C.S. Dept., University of Bari
 *
 * All rights reserved. This program and the accompanying materials are made available under
 * the terms of the Eclipse Public License v1.0  which accompanies this distribution, and is 
 * available at http://www.eclipse.org/legal/epl-v10.html
 */
package it.uniba.di.cdg.jtalk.ui.preferences;

import it.uniba.di.cdg.jtalk.internal.Activator;

import org.eclipse.jface.preference.BooleanFieldEditor;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;

/**
 * Server preference store.
 */
public class RemoteServerPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {

	private BooleanFieldEditor rememberPasswordEditor;
	private BooleanFieldEditor automaticLoginEditor;

	public RemoteServerPreferencePage() {
		super( GRID );
		setPreferenceStore( Activator.getDefault().getPreferenceStore() );
		IPreferenceStore store;
	}
	
	/* (non-Javadoc)
	 * @see org.eclipse.jface.preference.FieldEditorPreferencePage#createFieldEditors()
	 */
	@Override
	protected void createFieldEditors() {
		rememberPasswordEditor = new BooleanFieldEditor( "jtalk.remoteserver.rememberPassword", "Remember Password", getFieldEditorParent() );
		addField( rememberPasswordEditor );
		automaticLoginEditor = new BooleanFieldEditor( "jtalk.remoteserver.automaticLogin", "Automatic Login at startup", getFieldEditorParent() );
		addField( automaticLoginEditor );
	}

	/* (non-Javadoc)
	 * @see org.eclipse.ui.IWorkbenchPreferencePage#init(org.eclipse.ui.IWorkbench)
	 */
	@Override
	public void init( IWorkbench workbench ) {
		// Nothing
	}
}
